function SURFInterestPoint(x, y, scale, laplacian) {
  this.mX = x;
  this.mY = y;
  this.mScale = scale;
  this.mLaplacian = laplacian;
  this.mDescriptor = null;

  this.clone = function () {
    return new SURFInterestPoint(this.mX, this.mY, this.mScale, this.mLaplacian)
  }

  this.getScale = function () {
    return this.mScale;
  }

  this.getY = function () {
    return this.mY;
  }

  this.getX = function () {
    return this.mX;
  }

  this.setOrientation = function (orientation) {
    this.mOrientation = orientation;
  }

  this.getOrientation = function () {
    return this.mOrientation;
  }

  this.setDescriptor = function (descriptor) {
    this.mDescriptor = descriptor;
  }

  this.getDistance = function (point) {
    var sum = 0;
    if (point.getLocation() == null || this.mDescriptor == null)
      return Number.MAX_VALUE;
    for (var i = 0; i < this.mDescriptor.length; i++) {
      var diff = this.mDescriptor[i] - point.getLocation()[i];
      sum += diff * diff;
    }
    return Math.sqrt(sum);
  }

  this.getLocation = function () {
    return this.mDescriptor;
  }

  this.getX = function () {
    return this.mX;
  }

  this.getY = function () {
    return this.mY;
  }
}

module.exports = SURFInterestPoint
